package com.heima.search.controller;

import com.heima.common.dto.ResponseResult;
import com.heima.search.dto.ApArticleSearchDto;
import com.heima.search.service.IArticleLoadService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("api/v1/history")
public class ArticleLoadController {
    @Autowired
    private IArticleLoadService articleLoadService;

    /**
     * 搜索记录分页查询
     * @param dto
     * @return
     */
    @PostMapping("/load")
    public ResponseResult load(@RequestBody ApArticleSearchDto dto){
        return articleLoadService.load(dto);
    }

    /**
     * 搜索记录删除
     * @param dto
     * @return
     */
    @PostMapping("/del")
    public ResponseResult del(@RequestBody ApArticleSearchDto dto){
        return articleLoadService.del(dto);
    }
}
